def battle(player, enemy):
    while player.health > 0 and enemy.health > 0:
        player.tack_attack(enemy)
        if enemy.health <= 0:
            break
        enemy.tack_attack(player)
        if player.health <= 0:
            break
    if player.health > 0:
        print(f"{player.name} 战胜了 {enemy.name} !")
        return player
    else:
        print(f"{enemy.name} 战胜了 {player.name} !")
        return enemy